The Accordion Pane Component >Events > onEnable()

 

FAccordionPane : Event : onEnable()

Availability

Flash Player 6.

Usage

myAccordionListener.onEnable = function( enable, acp ) { ... }

Parameters

enable A Boolean value indicating the new enabled state of the component.

acp A reference to the AccordionPane component which triggered the event.

Returns


Nothing

Description

This event is triggered by the AccordionPane whenever it is enabled or disabled with the method setEnabled, and is broadcast to all listeners. Listeners may may be subscribed to listen for the onEnable event with the addListener method. By subscribing each item of content to listen for the event, you can make them react and reflect the enabled state of the AccordionPane.

 

Example

The accordion_addListener.fla example file contains an example of using this method.

The following example traces a message to the output window each time the AccordionPane is enabled or disabled.

// make an object to listen for the onEnable event
listener = new Object();


// subscribe the object to listen for onEnable
myAccordion_acp.addListener(listener);


// define a handler to be triggered when the Accordion's enabled state changes
listener.onEnable = function (enable, acp)
{
	trace ( acp + " has been " + (enable ? "enabled" : "disabled"));
}	

See also

FAccordionPane.addListener()

FAccordionPane.removeListener()